home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-10 | 2.0 KB | 66 lines | [TEXT/MMCC] |
- // File "aevents.c" -
-
- #include "aevents.h"
- #include "main.h"
- #include "Sample win.h"
-
- // ***********************************************************************************
- // Global Declarations
-
- extern GlobalsRec glob;
-
- // ***********************************************************************************
- // ***********************************************************************************
-
- pascal short AEHandlerOAPP(AppleEvent *event, AppleEvent *reply, long refCon) {
-
- NewSampleWindow();
-
- return(0);
- }
-
- // ***********************************************************************************
- // ***********************************************************************************
-
- pascal short AEHandlerODOC(AppleEvent *event, AppleEvent *reply, long refCon) {
-
- NewSampleWindow();
-
- return(0);
- }
-
- // ***********************************************************************************
- // ***********************************************************************************
-
- pascal short AEHandlerPDOC(AppleEvent *event, AppleEvent *reply, long refCon) {
-
- return(0);
- }
-
- // ***********************************************************************************
- // ***********************************************************************************
-
- pascal short AEHandlerQUIT(AppleEvent *event, AppleEvent *reply, long refCon) {
-
- glob.quitting = TRUE;
- return(0);
- }
-
- // ***********************************************************************************
- // ***********************************************************************************
-
- void InitHLEvents() {
- short i, err=0;
-
- err=AEInstallEventHandler(kCoreEventClass, kAEOpenApplication,
- NewAEEventHandlerProc(AEHandlerOAPP), 0, 0);
- err=AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
- NewAEEventHandlerProc(AEHandlerODOC), 0, 0);
- err=AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments,
- NewAEEventHandlerProc(AEHandlerPDOC), 0, 0);
- err=AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,
- NewAEEventHandlerProc(AEHandlerQUIT), 0, 0);
- }
-
-
-